<script setup lang="js">
import { ref } from 'vue';
window.addEventListener('wheel', (e) => {
  if (e.ctrlKey) e.preventDefault();
}, { passive: false });

window.addEventListener('keydown', (e) => {
  if ((e.ctrlKey || e.metaKey) && ['+', '-', '='].includes(e.key)) {
    e.preventDefault();
  }
});
const loading = ref(true)
// 渲染进程 setup 时注册监听
window.api.on('task-done', (event,data) => {
  console.log('主进程通知：关闭 loading',data);
  if (data.msg) {
  loading.value = true;
  }else{
  loading.value = false;
  }
});
</script>

<template>
  <div
    class="home"
    v-loading="loading"
    element-loading-background="rgba(122, 122, 122, 0.5)"
  >
    <launcher />
  </div>
</template>

<style scoped>
.home {
  height: 100vh;
  width: 100vw;
  background: #000;
}
</style>
